import QtQuick 1.1
import ".."

Item {
    property int seconds: dateInSeconds

    width: 100
    height: 100
    Utils {
        id: utils
    }

    Rectangle {
        anchors.fill: parent
        anchors.margins: 4
        Text {
            x: 3
            y: 3
            text: day
            font.pixelSize: 20
            color: month === model.month ? (dayOfWeek === 7 ? "pink" : "gray") : "lightgray"
        }
        Text {
            x: 30
            y: 12
            text: utils.getMonthName(month)
            font.pixelSize: 10
            color: month === model.month ? (dayOfWeek === 7 ? "pink" : "gray") : "lightgray"
        }
        border.width: 1
        border.color: "lightgray"
        color: jobsModel.count > 0 ? "yellow" : "white"
        ListView {
            y: 30
            x: 3
            width: parent.width
            height: parent.height

            model: jobsModel
            delegate: Rectangle {
                width: txt.width
                height: 12
                color: "yellow"

                Text {
                    id: txt
                    width: 80
                    clip: true
                    anchors.fill: parent
                    text: name
                    font.pixelSize: 10
                }
            }
        }
    }
}
